﻿using System.ComponentModel;

namespace Neo4jConnect
{
    public static class PropertyContainerExtensions
    {
        public static T GetProperty<T>(this IPropertyContainer container, string key)
        {
            TypeConverter converter = TypeDescriptor.GetConverter(typeof(T));
            return (T)converter.ConvertFrom(container.GetProperty(key));            
        }
    }
}
